<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>v-for的使用</title>
		<script src="vue.js"></script>
	</head>

	<body>
		<div id="app">
			<p v-for="item in list">{{item}}</p>
			<br />
			<p v-for="(item, i) in myList">{{item}}======={{i}}</p>
			<br />
			<p v-for="item in myList">{{item.id}}======={{item.name}}</p>
		</div>

		<script>
			var vm = new Vue({
				el: "#app",
				data: {
					list: [1, 2, 3, 4, 5],
					myList: [{
							id: 1,
							name: 'zhangsan'
						},
						{
							id: 2,
							name: 'list'
						},
						{
							id: 3,
							name: 'wangwu'
						}
					]
				}
			})
		</script>
	</body>

</html>